﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;
using System.Configuration;
using System.Data;
using System.Threading;
using UMLTouch.Core.Entities;
using UMLTouch.Core.UI;

namespace UMLTouch.DomainRecognition.Engines
{
    public class ItemRecognitionEngine : AbstractEngine<Shape,IDiagramItem>
    {


        public override void SpecificRecognition(Shape t)
        {
            IDiagramItem item=null;
            if (t != null)
            {
                if (t.ShapePattern != null)
                {
                    item = t.ShapePattern.GetItem(t);
                    
                }
                else
                {
                    item = new UnknownItem();
                }
            }
            if (item != null)
                PushOutput(item);
        }
    }
}
